package oj;

import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

public class NewCoder_Kitchen {
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        Set<String> set=new HashSet<>();
        while (scanner.hasNext()){
            String str=scanner.nextLine();
            String[] arr=str.split(" ");
            for(String word:arr){
                set.add(word);
            }
        }
        System.out.println(set.size());
    }
}
